#include "Cloud.h"
#include "Resource.h"

CLoud::CLoud(LPDIRECT3DDEVICE9 d3ddv, LPDIRECT3DSURFACE9 BackBuffer, LPD3DXSPRITE SpriteHandler, float x, float y, int ID, int Object_State) : Object(x, y)
{
	this->setIDObjType(ID);
	p_sprite = new Sprite(SpriteHandler, ResourceMng::GetInst(d3ddv, BackBuffer)->GetTexture(L"..\\Resources\\Images\\cloud.png"), 125, 0);
	
	obj_state = Object_State;	//not = 0, 0 = REMOVE
}

CLoud::~CLoud()
{
	if (p_sprite != NULL)
	{
		delete p_sprite;
	}
}

void CLoud::render(int cameraX, int cameraY)
{
	p_sprite->render(pos_x, pos_y, cameraX, cameraY);
}

void CLoud::update(list<Object*>* obj_list, DxInput* input, float gameTime)
{
	p_sprite->update(gameTime);
}

OBJECT_TYPE CLoud::getObjectType()
{
	return OBJECT_SCENE;
}